﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Modules.stats.trackers {
    import Engine.Managers.*;
    import Transactions.*;
    import Classes.util.*;
    import flash.net.*;
    import Modules.stats.types.*;
    import flash.external.*;

    public class StartupSessionTracker {

        public static const SAMPLING_RATE:int = 100;

        public static function track(_arg1:String):void{
            var _local2:Boolean;
            StatsManager.count(StatsCounterType.STARTUP, StatsKingdomType.STARTUP_ALL, _arg1);
            if (GlobalEngine.getFlashVars() != null){
                _local2 = (Number(GlobalEngine.getFlashVar("is_new")) > 0);
                if (_local2){
                    StatsManager.count(StatsCounterType.STARTUP, StatsKingdomType.STARTUP_FIRST, _arg1);
                };
            };
            StatsManager.sendStats(true);
        }
        public static function perf(_arg1:String):void{
            StatsManager.perfSample(SAMPLING_RATE, "timing", _arg1);
            StatsManager.sendStats(true);
        }
        public static function interactive():void{
            var _local4:String;
            var _local5:URLLoader;
            if (GlobalEngine.zaspManager){
                GlobalEngine.zaspManager.zaspInteractive();
            };
            perf(StatsKingdomType.INTERACTIVE);
            var _local1:URLRequest = new URLRequest((((Config.BASE_PATH + "v") + GlobalEngine.getFlashVar("flashRevision")) + "/keynote.php"));
            var _local2:Object = TransactionManager.additionalSignedParams;
            var _local3 = "";
            for (_local4 in _local2) {
                _local3 = (_local3 + (((_local4 + "=") + _local2[_local4]) + "&"));
            };
            _local1.data = _local3;
            _local5 = new URLLoader(_local1);
            GameTransactionManager.addTransaction(new TOnInteractive(), true);
            ExternalInterface.call("onInteractive");
        }

    }
}//package Modules.stats.trackers 
